Test for creating a domain with too little memory.
authordan@guaranine.beaverton.ibm.com <dan@guaranine.beaverton.ibm.com>
Wed, 16 Nov 2005 19:33:12 +0000 (20:33 +0100)
committerdan@guaranine.beaverton.ibm.com <dan@guaranine.beaverton.ibm.com>
Wed, 16 Nov 2005 19:33:12 +0000 (20:33 +0100)
tools/xm-test/tests/create/15_create_smallmem_pos.py [new file with mode: 0644]
tools/xm-test/tests/create/Makefile.am

diff --git a/tools/xm-test/tests/create/15_create_smallmem_pos.py b/tools/xm-test/tests/create/15_create_smallmem_pos.py
new file mode 100644 (file)
index 0000000..516c43a
--- /dev/null
@@ -0,0 +1,27 @@
+#!/usr/bin/python
+
+# Copyright (C) International Business Machines Corp., 2005
+# Author: Dan Smith <danms@us.ibm.com>
+
+from XmTestLib import *
+
+MEM = 16
+
+domain = XmTestDomain(extraOpts={"memory":"%i" % MEM})
+
+try:
+    domain.start()
+except DomainError, e:
+    FAIL("Unable to start a domain with %i MB" % MEM)
+
+try:
+    console = XmConsole(domain.getName())
+    console.sendInput("input")
+    console.runCmd("ls")
+except ConsoleError, e:
+    if e.reason == RUNAWAY:
+        FAIL("Bug #380: Starting a console with %i MB crashed the console daemon" % MEM)
+    else:
+        FAIL("Starting a console with %i MB failed: domain dies immediately!" % MEM)
+
+domain.destroy()
index 0d42752e78bb70eca4a7c0c0c7095891f44e0877..33eff51d38ea3fdb416b978a56fcae9325bac55a 100644 (file)
@@ -12,8 +12,8 @@ TESTS = 01_create_basic_pos.test \
        11_create_concurrent_pos.test \
        12_create_concurrent_stress_pos.test \
        13_create_multinic_pos.test \
-       14_create_blockroot_pos.test
-
+       14_create_blockroot_pos.test \
+       15_create_smallmem_pos.test
 
 DISABLED_TESTS =       05_create_noroot_noram_neg.test